home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-9.10-netbook-remix-PL.iso / casper / filesystem.squashfs / usr / share / system-config-printer / troubleshoot / SchedulerNotRunning.pyc (.txt) < prev    next >
Python Compiled Bytecode  |  2009-10-28  |  2KB  |  49 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. import cups
  5. from timedops import TimedOperation
  6. from base import *
  7.  
  8. class SchedulerNotRunning(Question):
  9.     
  10.     def __init__(self, troubleshooter):
  11.         Question.__init__(self, troubleshooter, 'Scheduler not running?')
  12.         page = self.initial_vbox(_('CUPS Service Stopped'), _("The CUPS print spooler does not appear to be running.  To correct this, choose System->Administration->Services from the main menu and look for the 'cups' service."))
  13.         troubleshooter.new_page(page, self)
  14.  
  15.     
  16.     def display(self):
  17.         self.answers = { }
  18.         if self.troubleshooter.answers.get('cups_queue_listed', False):
  19.             return False
  20.         parent = self.troubleshooter.get_window()
  21.         failure = False
  22.         
  23.         try:
  24.             self.op = TimedOperation(cups.Connection, parent = parent)
  25.             c = self.op.run()
  26.         except RuntimeError:
  27.             self.troubleshooter.answers.get('cups_queue_listed', False)
  28.             self.troubleshooter.answers.get('cups_queue_listed', False)
  29.             failure = True
  30.         except:
  31.             self.troubleshooter.answers.get('cups_queue_listed', False)
  32.  
  33.         self.answers['cups_connection_failure'] = failure
  34.         return failure
  35.  
  36.     
  37.     def can_click_forward(self):
  38.         return False
  39.  
  40.     
  41.     def collect_answer(self):
  42.         return self.answers
  43.  
  44.     
  45.     def cancel_operation(self):
  46.         self.op.cancel()
  47.  
  48.  
  49.